package practice;

public class DatePrac {
    private int year;
    private int month;
    private int date;

    //计算星期的方法
    public  static int dayOfWeek(int year,int month,int date){
        //String[] wd={"日","一","二","三","四","五","六","七",};
        int y=year;
        int m=month;
        if (m==1||m==2){
            y--;
            m+=12;
        }
        return (y+y/4-y/100+y/400+(13*m+8)/5+date%7);
    }
}
